<template>
  <div>
    <Chat v-if="$store.getters.JIMVisible"></Chat>
    <w-top-nav v-if="appContaint"></w-top-nav>
    <router-view></router-view>
    <w-footer v-if="appContaint"></w-footer>
  </div>
</template>

<script>
  import Chat from './pages/chat'

  export default {
    data() {
      return {
        appContaint: true
      }
    },
    components: {
      Chat
    },
    created() {
      if (this.$route.path == '/login' || this.$route.path == '/register' || this.$route.path == '/forget') {
        this.appContaint = false
      }
    },
    watch: {
      $route(to, from) {
        this.appContaint = true
        if (to.path == '/login' || to.path == '/register' || to.path == '/forget') {
          this.appContaint = false
        }
      }
    }
  }
</script>


<style lang="scss" scoped>
</style>
